package com.xiaol.business.form;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xiaol.business.model.Student;

import javax.validation.constraints.Min;
import java.util.Date;

public class StudentForm extends Student {
    private Integer id;
    private String name;
    @Min(value = 18, message = "未满18岁")
    private Integer age;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date accessTime;


    public StudentForm() {
    }

    @Override
    public String toString() {
        return "StudentForm{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", accessTime=" + accessTime +
                '}';
    }

    @Override
    public Integer getId() {
        return id;
    }
    @Override
    public void setId(Integer id) {
        this.id = id;
    }
    @Override
    public String getName() {
        return name;
    }
    @Override
    public void setName(String name) {
        this.name = name;
    }
    @Override
    public Integer getAge() {
        return age;
    }
    @Override
    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getAccessTime() {
        return accessTime;
    }
    public void setAccessTime(Date accessTime) {
        this.accessTime = accessTime;
    }
}
